﻿
package fflib.utils 
{
	import fflib.utils.StringUtil;
	import flexunit.framework.Assert;
	import flexunit.framework.TestCase;
	
	public class StringUtilTest extends TestCase
	{
		public function testMultiply():void
		{
			Assert.assertEquals("", StringUtil.multiply("x", 0));
			Assert.assertEquals("x", StringUtil.multiply("x", 1));
			Assert.assertEquals("xx", StringUtil.multiply("x", 2));
			Assert.assertEquals("xxxxxxxxxx", StringUtil.multiply("x", 10));
		}
		
		public function testTrim():void
		{
			Assert.assertEquals("asdf", StringUtil.trim("\t\n\rasdf  \t \n "));
			Assert.assertEquals("as\r\n\t df", StringUtil.trim("as\r\n\t df"));
		}
	}
}
